<html>
<head>
<title>Upload file</title>	
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel="stylesheet" type="text/css" href="../../../lib/css/layout.css"/>
	<link  rel="stylesheet" type="text/css" href="../../../lib/css/jquery-ui-1.8.6.custom.css" />
	<link rel="stylesheet" href="../../../lib/css/smartui.css"/>
	<link rel="stylesheet" href="../../../lib/css/general.css"/>
	<link rel="stylesheet" href="../../../lib/css/jquery.treeview.css"/>
	
    <script src="../../../lib/jquery-1.4.4.min.js" type="text/javascript"></script>
	<script src="../../../lib/jquery.cookie.js" type="text/javascript"></script>
	<script src="../../../lib/jquery.treeview.js" type="text/javascript"></script>
	<script type="text/javascript" src="../../../lib/demo.js"></script>
    <script type="text/javascript" src="../../../lib/common.js"></script>
	<script type="text/javascript" src="../../../lib/datetimepicker_css.js"></script>
    <script type="text/javascript" src="../../../lib/jquery-ui-1.8.6.custom.min.js"></script>
	<script type="text/javascript" src="../../../lib/picnet.js"></script>
    <script type="text/javascript" src="../../../lib/ajaxfileupload.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	
	//alert("aaaa");	
});
function ajaxFileUpload()
	{
		var name=$('#name').val();
		$.ajaxFileUpload({
				url:'upload_file.php',
				secureuri:false,
				data:"name="+name,
				success:function (data){
					alert(data);
			 	}
			});

}
function get_result(res){
	//alert("aaa");
	$("#result").val(res);
	opener.set_dirfile(res);
	window.self.close();
}
</script>
</head>

<body onLoad="form_load()">
<div id="uploadFile"  title="Upload file">
<form id="uploadform" name="uploadform" method="POST" action="upload_file.php" ENCTYPE="multipart/form-data" target="iframe">								
				<table class="ctable" cellspacing="1" cellpadding="0" width="100%" border="0">
					<tr height="30">
						<td height="30" align="center" class="label">Tên file: <input name="name"  id="name" type="hidden" value="name_file">
					  <input name="name_file"  type="file" style="WIDTH: 80%; height:22" size="50" value="hien.png"></td>
					</tr>
					<tr height="30">
						<td height="30" align="center" class="label"><b style="color:red;";>jpg,gif,png</b></td>
					</tr>
					<tr>
					  <td width="80%" height="22" align="center">
							<input id="cmdSave" style="width:100;height:25" class="cbutton"  type="submit" value="Upload" name="cmdSave"></td>
					</tr>
				</table>
</form>
<input type="hidden" id="result">
</div>
<img src="tmp.gif" name="tmpImg" id="tmpImg" width="1" height="1"/>
</body>
</html>
 